<script>   
    let { b, c, ...rest } = {  a: 10,  b: 20, c: 30, d: 40 };   
    console.log(b); // 20   
    console.log(c); // 30   
    console.log(rest); //{a: 10, d: 40}   
</script>